<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
    <title>网站管理中心</title>
    <style type="text/css">
        *{ padding:0; margin:0;}
        body{ text-align:center; background:#4974A4;}
        #login{ width:740px; margin:0 auto; font-size:12px;}
        #loginlogo{ width:700px; height:100px; overflow:hidden; background:url('manage/pic/login/logo.png') no-repeat; margin-top:50px;   }
        #loginpanel{ width:729px; position:relative;height:300px;}
        .panel-h{ width:729px; height:20px; background:url('manage/pic/login/panel-h.gif') no-repeat; position:absolute; top:0px; left:0px; z-index:3;}
        .panel-f{ width:729px; height:13px; background:url('manage/pic/login/panel-f.gif') no-repeat; position:absolute; bottom:0px; left:0px; z-index:3;}
        .panel-c{ z-index:2;background:url('manage/pic/login/panel-c.gif') repeat-y;width:729px; height:300px;}
        .panel-c-l{ position:absolute; left:60px; top:40px;}
        .panel-c-r{ position:absolute; right:20px; top:50px; width:222px; line-height:200%; text-align:left;}
        .panel-c-l h3{ color:#556A85; margin-bottom:10px;}
        .panel-c-l td{ padding:7px;}
        
        
        .login-text{ height:24px; left:24px; border:1px solid #e9e9e9; background:#f9f9f9;}
        .login-text-focus{ border:1px solid #E6BF73;}
        .login-btn{width:114px; height:29px; color:#E9FFFF; line-height:29px; background:url('manage/pic/login/login-btn.gif') no-repeat; border:none; overflow:hidden; cursor:pointer;}
        #txtUsername,#txtPassword{ width:191px;} 
        #logincopyright{ text-align:center; color:White; margin-top:50px;}
    </style>
  </head>
  
  <body style="padding:10px" id="userlogin_body"> 
    <div id="login">
        <div id="loginlogo"></div>
        <div id="loginpanel">
            <div class="panel-h"></div>
            <div class="panel-c">
                <div class="panel-c-l">
                   <form action="${pageContext.request.contextPath}/admin/login" method="post" id="sign-in-form">
                    <table cellpadding="0" cellspacing="0">
                        <tbody>
                         <tr>
                            <td align="left" colspan="2"> 
                             <h3>管理系统账号登陆</h3>
                            </td>
                            </tr> 
                            <tr>
                            <td align="right">账号：</td><td align="left">
                            <input type="text" name="j_username" id="txtUsername" value="${sessionScope['SPRING_SECURITY_LAST_USERNAME']}" class="login-text" />
                            </td>
                            </tr>
                            <tr>
                            <td align="right">密码：</td><td align="left"><input type="password" name="j_password" id="txtPassword" class="login-text" /></td>
                            </tr> 
                            <tr>
                            <td align="center" colspan="2">
                                <input type="submit" id="btnLogin" value="" class="login-btn" onclick="document.getElementById('sign-in-form').submit(); return false;"/>
                            </td>
                            </tr> 
                        </tbody>
                    </table>
                    </form>
                </div>
                <div class="panel-c-r">
                </div>
            </div>
            <div class="panel-f"></div>
        </div>
         <div id="logincopyright">Copyright © 2012 Content Management System </div>
         <div class="error${param.error == true ? 'show' : 'hide'}">
			  <font color="red">${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message == 'Bad credentials' ? '账号或者密码错误' : sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}</font>
			</div>
			<div class="error${param.timeout == true ? 'show' : 'hide'}">
			  <font color="red">登陆超时，请重新登陆！</font>
			</div>
    </div>
</body>
</html>
